package o;

import android.content.Context;

public class cuh {
    public static void ˋ(Context context) {
        if (context == null) {
            Logger.ˎ("PushDeviceTokenService", "context == null");
        } else if (!euf.ˎ().ˏ()) {
            Logger.ˎ("PushDeviceTokenService", "push sms flag is false");
        } else if (!doo.ˊ(context)) {
            Logger.ˎ("PushDeviceTokenService", "no active net work, skip push token report");
        } else if (!context.getSharedPreferences("PluginInfo", 0).getBoolean("is_register_succeed", false)) {
            Logger.ˏ("PushDeviceTokenService", "Start get push token use getTokenAsyn.");
            new cuh().ˏ();
        }
    }

    public void ˏ() {
        if (((eov) cdb.ॱ(eov.class)).ॱ(ContentManager.getInstant().getContext())) {
            Logger.ˎ("PushDeviceTokenService", "Sorry, need interrupt getTokenAsyn. Can not getTokenAsyn.");
        } else {
            ctw.ॱ();
        }
    }

    public void ॱ(Context context, String str) {
        Logger.ˎ("PushDeviceTokenService", "uploadDeviceToken");
        ˎ(context, str);
    }

    private void ˎ(Context context, String str) {
        cue ˎ = cty.ˎ().ˎ("15");
        if (ˎ != null) {
            ˎ.ˋ(context, str);
        }
    }
}
